home *** CD-ROM | disk | FTP | other *** search
- Path: etek.chalmers.se!chalmers.se!sunic!mcsun!uunet!cbmvax!chrisg
- From: chrisg@cbmvax.commodore.com (Chris Green)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Random No.s in AmigaDOS ??
- Message-ID: <35821@cbmvax.commodore.com>
- Date: 13 Oct 92 12:43:05 GMT
- References: <1992Oct12.093044.3346@lugb.latrobe.edu.au>
- Reply-To: chrisg@cbmvax.commodore.com (Chris Green)
- Organization: Commodore, West Chester, PA
- Lines: 18
-
- In article <1992Oct12.093044.3346@lugb.latrobe.edu.au> csccm@luxury.latrobe.edu.au (Chris Miles!!) writes:
- >
- >Can anyone tell me how you make random numbers in AmigaDOS ??
- >I want to write a small script file that does different things randomly,
- >so how do I get this random number??!
- >
- set myvar `rx "say bitand(c2d(import('00df f006'x,4)),255)`
-
- This reads the beam position from the custom chips. Not normally
- a good random number source, but perfectly adequate for a shell script.
- --
- *-------------------------------------------*---------------------------*
- |Chris Green - Graphics Software Engineer - chrisg@commodore.COM f
- | Commodore-Amiga - uunet!cbmvax!chrisg n
- |My opinions are my own, and do not - icantforgettheimpression o
- |necessarily represent those of my employer.- youmadeyouleftaholeinthe r
- |"A screaming comes across the sky..." - backofmyhead d
- *-------------------------------------------*---------------------------*